package xcmg.device.dao.mapper.agent;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import xcmg.device.dao.entity.agent.ServiceBorrowOutDO;
import xcmg.device.service.vo.agent.ServiceBorrowOutVO;
import yb.ecp.fast.infra.infra.PageCommonVO;
import yb.ecp.fast.infra.infra.SearchCommonVO;


/**
 * 服务借出单 Mapper
 *
 * @author huhuawei
 */
@Mapper
public interface ServiceBorrowOutMapper {

    PageCommonVO list(SearchCommonVO<ServiceBorrowOutVO> condition);

    List<ServiceBorrowOutDO> queryList(ServiceBorrowOutVO condition);

    int insert(ServiceBorrowOutDO model);

    int merge(ServiceBorrowOutDO model);
    
    int mergeIntoByNo(ServiceBorrowOutDO model);

    int updateByPrimaryKeySelective(ServiceBorrowOutDO bean);

    int deleteByPrimaryKeySelective(String id);

    ServiceBorrowOutDO selectByBorrowNo(@Param("borrowNo") String borrowNo, @Param("orgId") String orgId);

    ServiceBorrowOutDO item(@Param("id") String id);
    
    int updateAmount(@Param("borrowNo") String borrowNo, @Param("totalAmount") BigDecimal totalAmount);
}
